import { createSlice } from "@reduxjs/toolkit";
import { PostItem } from "@src/model";

export interface PostDetailState {
  data: Partial<PostItem>;
}


const initialState: PostDetailState = {
  data: {},
};



export const CurrentPost = createSlice({
  name: "currentPost",
  initialState,
  reducers: {
    setValue(state,{ payload }){
      state.data = payload;
    }
  },
});

export const { setValue } = CurrentPost.actions;

